{include header}
<link href="{#WWW}/public/css/simditor.css" type="text/css" rel="stylesheet">
{hook t_post_edit_1}
<label>修改内容 <span></span></label>
<textarea id="editor" autofocus>{$data.content}</textarea>
{hook t_post_edit_2}
<button type="button" class="btn btn-primary" id="post1"><i class="am-icon-check"></i> 发 表</button>
<script src="{#WWW}/public/js/edit.min.js"></script>

<script>
$(function(){
    $("#post1").click(function(){



        $.ajax({
         url: '{#WWW}/post/edit.html',
         type:"POST",
         cache: false,
         data:{
             id:{$id},
             content:editor.textarea.val(),
             {hook t_post_edit_3}
         },
         dataType: 'json'
     }).then(function(e) {
         {hook t_post_edit_4}
         alert(e.info);

       }, function() {
           {hook t_post_edit_5}
         alert('请尝试重新提交');
       });
    })
})
</script>
{include footer}
